<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <link rel="StyleSheet" type="text/css" href="../css/style.css" media="screen" />
    <h:head>
        <title>FitoDB</title>
    </h:head>
    <h:form>
        <p:panel rendered="#{not loginBean.logedAdmin}" styleClass="erroLogin">
            Ops! Acho que você não deveria estar aqui.
            Que tal voltar <p:commandLink onclick="retorna()">aqui</p:commandLink>?
            <script type="text/javascript" language="javascript">
                function retorna() {
                    window.location.href = '../index.xhtml';
                }
            </script>
        </p:panel>
    </h:form>
    <h:body styleClass="body" rendered="#{loginBean.logedAdmin}">
        <p:growl id="growl" showDetail="true" life="3000" />
        <div class="screen">
            <div Class="cabecalho">
                <div style="float: right !important; position: relative !important; text-align: center !important;">
                    <img src="../img/logo2.png" height="80" /><br/>
                    <h:outputText value="#{bundle.Version}" style="padding: 10px 0px 0px 0px !important;"/><br/>
                </div>
                <h:form id="loga" style="padding: 0px 33px 0px 33px !important;">
                    <p style="text-align: right !important; margin-top: 110px !important;"><h:outputText value="#{loginBean.usuario.nome}" id="usu"/>, <p:commandLink value="Meus dados" action="/conteudo-admin/editar-admin.xhtml"/>, <p:commandLink value="sair" action="#{loginBean.logout}"/></p>
                </h:form>
                <h:form>

                    <p:growl id="messages"/>

                    <p:menubar styleClass="menuAdmin" autoDisplay="false">

                        <p:menuitem value="Inicio" icon="ui-icon-home" action="/conteudo-admin/sobre-admin.xhtml" ajax="false" />
                        <p:menuitem value="Professor" icon="ui-icon-person" action="/conteudo-admin/gerenciar-professor.xhtml" ajax="false" />
                        <p:menuitem value="Usuários" icon="ui-icon-person" action="/conteudo-admin/gerenciar-usuario.xhtml" ajax="false"/>
                        <p:menuitem value="Ajuda" icon="ui-icon-help" action="/conteudo-admin/ajuda-admin.xhtml" ajax="false" />
                        <!--<p:menuitem value="Sair" icon="ui-icon-close" action="#{loginBean.logout}" ajax="false"/>-->

                    </p:menubar>

                </h:form>
            </div>
            <div Class="corpo">
                <div class="conteudo">
                    <ui:insert name="corpo">

                        Conteúdo padrão

                    </ui:insert>
                </div>
            </div>
            <p:toolbar styleClass="rodape">
                <p:toolbarGroup align="left">
                    <!--<h:outputText value="rodape"/>-->
                </p:toolbarGroup>
            </p:toolbar>
        </div>
    </h:body>
</html>